const express = require('express');
const router = express.Router();
const Blog = require('./../../mongoModuels/stateg/blog');

router.get('/myInfo', (req, res) => {
    let query = Blog.myInfo.find({});
    query.select('-_id');
    query.select('-creationTime');
    query.exec({}, (err, data) => {
        if(err) {
            res.json({
                status: 0,
                message: err
            })
        } else {
            res.json({
                status: 1,
                message: '操作成功',
                data: {
                    portrait: data[0].portrait,
                    introduce: data[0].introduce,
                    mailbox: data[0].mailbox,
                    mayun: data[0].mayun
                }
            })
        }
    })
})

module.exports = router;